﻿using System.Collections.Generic;
using System.IO;

namespace SilverAmp
{
    public class MediaFile : TagLib.File.IFileAbstraction
    {
        private FileInfo _file;

        public Dictionary<string, string> MediaInfo { get; set; }

        public static implicit operator MediaFile(FileInfo file)
        {
            var m = new MediaFile();
            m._file = file;
            return m;
        }

        public void CloseStream(Stream stream)
        {

        }

        public string Name
        {
            get { return _file.Name; }
        }

        public Stream ReadStream
        {
            get { return _file.OpenRead(); }
        }

        public Stream WriteStream
        {
            get { return _file.OpenWrite(); }
        }
    }
}